package com.hmall.common.config;

import com.hmall.common.fallback.ItemClientFallbackFactory;
import feign.Logger;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableFeignClients(basePackages = "com.hmall.common.client")
@Configuration
public class DefaultFeignConfiguration {

    @Bean
    public Logger.Level loggerLevel() {
        // 日志级别为BASIC，这是个枚举类型
        return Logger.Level.BASIC;
    }

    public ItemClientFallbackFactory itemClientFallbackFactory(){return new ItemClientFallbackFactory();}
}
